/******************************************************************************
* File description: MaintenanceYingGuang2GuangQiang.qml
* Function: 维护-荧光检测：光强设置
* Current Version: 1.0.0
* Author: 张宇轩
* Date: 2024-08-29
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14

Item {
    id: root

    /* property 定义开始 */

    /* property 定义结束 */

    ColumnLayout {
        id: containerColumnLayout
        anchors {
            fill: parent
            topMargin: 16
            leftMargin: 16
            rightMargin: 16
        }

        // 上半部分
        Item {
            id: topPart
            Layout.fillWidth: true
            Layout.preferredHeight: 40

            RowLayout {
                id: topPartLayout
                anchors.fill: parent
                spacing: 8

                // 通道
                LabelComboBox {
                    id: tongDao
                    Layout.fillWidth: true
                    Layout.fillHeight: true
                    comboBoxWidth: width
                    comboBoxHeight: height
                    showListMaxCountinPage: 5
                    model: ["请选择", "FAM", "VIC", "ROX", "CY5"]
                    comboBoxText: "通道"
                    comboDefaultText: "请选择"
                }

                // 激发光强度值
                LabelTextInput {
                    id: jiFaGuangQiangDu
                    Layout.fillWidth: true
                    Layout.fillHeight: true
                    inputWidth: width
                    inputHeight: height
                    placeholderText: "请输入"
                    labelText: "激发光强度值"
                }

                // 光强读取
                PureButton {
                    id: readGuangQiangBtn
                    Layout.preferredWidth: 120
                    Layout.preferredHeight: 40
                    pureBtnColor: "#FF2F42CD"
                    pureHoveredColor: "#FF2F42CD"
                    pureLabelColor: "#FFFFFFFF"
                    pureFontHoveredColor: "#FFFFFFFF"
                    pureBtnBorderColor: "transparent"
                    pureText: "光强读取"
                    disabledPureBtnColor: "#FFF5F5F5"
                    disabledPureBtnBorderColor: "#FFD9D9D9"
                    disabledPureLabelColor: "#FFBFBFBF"
                    // 关闭过渡效果
                    isTransition: false
                }

                // 光强写入
                PureButton {
                    id: writeGuangQiangBtn
                    Layout.preferredWidth: 120
                    Layout.preferredHeight: 40
                    pureBtnColor: "#FF2F42CD"
                    pureHoveredColor: "#FF2F42CD"
                    pureLabelColor: "#FFFFFFFF"
                    pureFontHoveredColor: "#FFFFFFFF"
                    pureBtnBorderColor: "transparent"
                    pureText: "光强写入"
                    disabledPureBtnColor: "#FFF5F5F5"
                    disabledPureBtnBorderColor: "#FFD9D9D9"
                    disabledPureLabelColor: "#FFBFBFBF"
                    // 关闭过渡效果
                    isTransition: false
                }
            }
        }

        // 分割线
        Rectangle {
            Layout.fillWidth: true
            Layout.preferredHeight: 2
            color: "#FFE6E6E6"
            border.width: 0
        }

        // 下半部分
        Item {
            id: bottomPart
            Layout.fillWidth: true
            Layout.fillHeight: true

            ColumnLayout {
                id: bottomPartLayout
                anchors.fill: parent

                // 输入框部分
                Item {
                    id: inputsContainer
                    Layout.fillWidth: true
                    Layout.preferredHeight: inputsLayout.implicitHeight

                    GridLayout {
                        id: inputsLayout
                        anchors.fill: parent
                        rows: 4
                        columns: 2
                        rowSpacing: 16
                        columnSpacing: 10
                        // 从上到下布局
                        flow: GridLayout.TopToBottom

                        // 检测1系数
                        LabelTextInput {
                            id: jianCe1XiShu
                            Layout.fillWidth: true
                            Layout.preferredHeight: 40
                            inputWidth: width
                            inputHeight: height
                            placeholderText: "请输入"
                            labelText: "检测 1 系数"
                        }

                        // 检测2系数
                        LabelTextInput {
                            id: jianCe2XiShu
                            Layout.fillWidth: true
                            Layout.preferredHeight: 40
                            inputWidth: width
                            inputHeight: height
                            placeholderText: "请输入"
                            labelText: "检测 2 系数"
                        }

                        // 检测3系数
                        LabelTextInput {
                            id: jianCe3XiShu
                            Layout.fillWidth: true
                            Layout.preferredHeight: 40
                            inputWidth: width
                            inputHeight: height
                            placeholderText: "请输入"
                            labelText: "检测 3 系数"
                        }

                        // 检测4系数
                        LabelTextInput {
                            id: jianCe4XiShu
                            Layout.fillWidth: true
                            Layout.preferredHeight: 40
                            inputWidth: width
                            inputHeight: height
                            placeholderText: "请输入"
                            labelText: "检测 4 系数"
                        }

                        // 检测5系数
                        LabelTextInput {
                            id: jianCe5XiShu
                            Layout.fillWidth: true
                            Layout.preferredHeight: 40
                            inputWidth: width
                            inputHeight: height
                            placeholderText: "请输入"
                            labelText: "检测 5 系数"
                        }

                        // 检测6系数
                        LabelTextInput {
                            id: jianCe6XiShu
                            Layout.fillWidth: true
                            Layout.preferredHeight: 40
                            inputWidth: width
                            inputHeight: height
                            placeholderText: "请输入"
                            labelText: "检测 6 系数"
                        }

                        // 检测7系数
                        LabelTextInput {
                            id: jianCe7XiShu
                            Layout.fillWidth: true
                            Layout.preferredHeight: 40
                            inputWidth: width
                            inputHeight: height
                            placeholderText: "请输入"
                            labelText: "检测 7 系数"
                        }

                        // 检测8系数
                        LabelTextInput {
                            id: jianCe8XiShu
                            Layout.fillWidth: true
                            Layout.preferredHeight: 40
                            inputWidth: width
                            inputHeight: height
                            placeholderText: "请输入"
                            labelText: "检测 8 系数"
                        }
                    }
                }

                // 按钮部分
                Item {
                    id: bottomBtnsContainer
                    Layout.fillWidth: true
                    Layout.preferredHeight: 40

                    RowLayout {
                        anchors.fill: parent

                        CustomHorSpacerItem {}

                        // 读取
                        PureButton {
                            id: readOutBtn
                            Layout.preferredWidth: 120
                            Layout.preferredHeight: 40
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "读取"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }

                        // 写入
                        PureButton {
                            id: writeInBtn
                            Layout.preferredWidth: 120
                            Layout.preferredHeight: 40
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "写入"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }
                    }
                }

                CustomVerSpacerItem {}
            }
        }
    }
}
